cmake_minimum_required(VERSION 3.11)
project(demo4)
add_subdirectory("main")
add_subdirectory("mylib")
file(GLOB_RECURSE header ./mylib/*.h) # 也可以为.cpp文件
# AUX_SOURCE_DIRECTORY()
install(FILES ${header} DESTINATION include) # 添加包含目录
install(TARGETS demo4 mylib
        EXPORT demo4
        LIBRARY DESTINATION lib
        ARCHIVE DESTINATION lib
        RUNTIME DESTINATION bin
        # INCLUDES  DESTINATION include
        )